Skip to content

Conversation

mccullocht
Copy link

No description provided.

@abr-egn
Copy link
Contributor

abr-egn commented Apr 2, 2025

I'm pretty hesitant about this approach - it adds a lot of complexity to serialization (which is already overdrawn on the complexity budget) for a relatively narrow use case, and it also seems likely to be a significant performance hit because of the double serialization required for the length calculation.

I'm assuming your current approach is to use bson::to_vec and then write that into the destination buffer via bytes::BufMut::put - has profiling shown the allocation or copy there to be substantial cost?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants